package org.wicket.jbpm.page;

import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.wicket.jbpm.engine.spring.JbpmProcessEngine;
import org.wicket.jbpm.engine.workflow.WfTask;


/**
 * 
 * @author Emmanuel Nollase - emanux
 * created 2009 10 12 - 17:35:43
 */
public abstract class BaseProcessPage extends WicketJBPMBasePage
{

    @SpringBean private JbpmProcessEngine jbpmProcessEngine;
    
    public BaseProcessPage(WfTask wfTask)
    {
	super();
	
	String defs[] = jbpmProcessEngine.getProcessName(wfTask.tid);
	
	add(new Label("desc", defs[1]));
	
	final WebMarkupContainer imgProcImage = new WebMarkupContainer("imgProcImage");
	imgProcImage.add(new SimpleAttributeModifier("src", "jbpm/"+defs[0]+"/processimage.jpg"));
	
	add(imgProcImage);
	
    }
}

